feat(wangamail-csharp, wangapayfast-csharp): add initial implementations for email and payment processing clients#40
Merged
Merged
Conversation
…ons for email and payment processing clients - Introduced `GraphMailClient` and `GraphMailClientBuilder` for sending emails via Microsoft Graph API. - Added `PayFastClient` and `PayFastClientBuilder` for building PayFast checkout payloads and signatures. - Implemented models for email and payment requests, including validation and error handling. - Created unit tests for both clients to ensure functionality and error handling. - Added README files for both libraries to provide usage instructions and features.
…TP helpers - Added `ItnNotification` class for parsing and verifying ITN payloads. - Introduced `PayFastHttpHelpers` for post-back validation and generating payment identifiers. - Enhanced `PayFastClient` with methods for ITN signature generation and verification. - Updated `PayFastModels` to include `ItnPaymentStatus` enum and `OnsiteProcessResponse` model. - Expanded README with ITN and HTTP helper usage examples. - Added unit tests for ITN signature verification and post-back validation.
…nverter - Removed the JsonStringEnumMemberName attribute from BodyType enum. - Implemented BodyTypeJsonConverter for custom serialization and deserialization of BodyType values. - Updated MessageBody to use the new BodyTypeJsonConverter for ContentType property. - Modified project file to exclude test files from compilation.
…Microsoft Graph API - Introduced `GraphMailClient` for sending emails with app registration credentials. - Added data models for email payloads, including `Message`, `MessageBody`, `Recipient`, and `SendMailRequest`. - Implemented error handling with custom exceptions: `ConfigError` and `GraphAPIError`. - Created a CLI entry point for manual checks and environment variable support. - Added unit tests to validate email payload structure. - Included package metadata and usage instructions in README.
- Introduced `System.Text.Json` namespace to `GraphModels.cs` for enhanced JSON handling capabilities.
- Modified the test commands in both `wangamail-csharp.yml` and `wangapayfast-csharp.yml` workflows to replace `--no-build` with `--no-restore`, improving efficiency by avoiding unnecessary restore operations during testing.
- Added `Xunit` namespace to `GraphModelsTests.cs` for unit testing support. - Updated project file to exclude test files from compilation, improving build efficiency.
…istency - Changed the hash conversion method in `PayFastClient` to use `Convert.ToHexString(hash).ToLowerInvariant()` for consistent lowercase output in both signature generation methods.
- Added `Xunit` namespace to `PayFastClientTests.cs` to support unit testing functionality.
- Updated `BuildSignaturePayload` and `BuildItnSignaturePayload` methods in `PayFastClient` from internal to public access, allowing for broader usage in external contexts.
This was
linked to
issues
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GraphMailClientandGraphMailClientBuilderfor sending emails via Microsoft Graph API.PayFastClientandPayFastClientBuilderfor building PayFast checkout payloads and signatures.